package com.kudian.restful.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * ReadMessage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "read_message")
public class ReadMessage implements java.io.Serializable {

	// Fields

	private Integer rmId;
	private Integer messageId;
	private Integer userId;
	private Boolean readed;
	private Timestamp readTime;
	private Boolean deleted;

	// Constructors

	/** default constructor */
	public ReadMessage() {
	}

	/** minimal constructor */
	public ReadMessage(Integer userId, Boolean readed, Timestamp readTime,
			Boolean deleted) {
		this.userId = userId;
		this.readed = readed;
		this.readTime = readTime;
		this.deleted = deleted;
	}

	/** full constructor */
	public ReadMessage(Integer messageId, Integer userId, Boolean readed,
			Timestamp readTime, Boolean deleted) {
		this.messageId = messageId;
		this.userId = userId;
		this.readed = readed;
		this.readTime = readTime;
		this.deleted = deleted;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "rm_id", unique = true, nullable = false)
	public Integer getRmId() {
		return this.rmId;
	}

	public void setRmId(Integer rmId) {
		this.rmId = rmId;
	}

	@Column(name = "message_id")
	public Integer getMessageId() {
		return this.messageId;
	}

	public void setMessageId(Integer messageId) {
		this.messageId = messageId;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "readed", nullable = false)
	public Boolean getReaded() {
		return this.readed;
	}

	public void setReaded(Boolean readed) {
		this.readed = readed;
	}

	@Column(name = "read_time", nullable = false, length = 19)
	public Timestamp getReadTime() {
		return this.readTime;
	}

	public void setReadTime(Timestamp readTime) {
		this.readTime = readTime;
	}

	@Column(name = "deleted", nullable = false)
	public Boolean getDeleted() {
		return this.deleted;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}

}